import axios, { AxiosRequestConfig } from 'axios';

const config: AxiosRequestConfig = {
    baseURL: 'https://www.baidu.com/',
    timeout: 1000,
}

const instance = axios.create(config);

console.log("test[111]");
instance.get("/").then((response) => {
    console.log("test[333]");
    console.log(response.data);
    console.log("test[444]");
})
console.log("test[222]");

async function test(): Promise<void> {
    console.log("test[1]");
    const response = await instance.get("/")
    console.log(response.data)
    console.log("test[2]")
}

test().then().catch((e) => { console.log(e) })

console.log("Hello World!")